/**
 * Copyright (C) 2015-2016 Guangzhou Xunhong Network Technology Co., Ltd. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *     http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.jxccp.ui.presenter;

import androidx.annotation.Nullable;

import com.jxccp.im.chat.common.message.JXMessage;
import com.jxccp.ui.entities.JXCommodity;
import com.jxccp.ui.entities.JXOrderInfo;
import com.jxccp.ui.entities.ZhuiyiLoanOrderEntity;
import com.jxccp.ui.entities.ZhuiyiProductOrderEntity;
import com.jxccp.ui.model.JXRequestCusServiceTask.RequestCusServiceCallback;

public interface JXChatPresenter {
    /**
     * 发送文本消息
     * @param text
     */
    void sendTextMessage(String text);

    /**
     * 发送图片消息
     */
    void sendImageMessage(String filePath);

    /**
     * 发送语音消息
     */
    void sendVoiceMessage(String filePath, int voiceDur);

    /**
     * 发送视频消息
     */
    void sendVideoMessage(String filePath);

    /**
     * 发送商品信息
     * @param commodity
     */
    public void sendCommodityMessage(JXCommodity commodity);

    /**
     * 发送订单信息
     * @param orderInfo
     */
    public void sendOrderMessage(JXOrderInfo orderInfo);

    /**
     * 加载更多聊天信息
     */
    public void loadMoreMessages(@Nullable String lastMesageId);

    /**
     * 消息重发
     * @param jxMessage
     */
    public void resendMessage(JXMessage jxMessage);

    void onDestroy();

    /**
     * 复制文本消息
     * @param message
     */
    void copyTextMessage(String message);

    /**
     * 删除消息
     * @param jxMessage
     */
    void deleteMessage(JXMessage jxMessage);

    /**
     * 客服请求
     * @param skillsId
     * @param extendData
     * @param Tag
     */
    void requestCustomer(String skillsId, String extendData, int Tag, JXMessage triggerMsg, RequestCusServiceCallback callback);

    /**
     * 在线获取消息
     * @param pullToRefresh
     * @param jxMessage
     * @param chatType
     */
    public void fetchMessages(boolean pullToRefresh, JXMessage jxMessage,
                              JXMessage.ChatType chatType);

    /**
     * 机器人回答反馈
     * @param message
     * @param isSatisfy
     */
    public void sendRobotFeedBack(JXMessage message , Boolean isSatisfy, String unSatisfiedReason);

    /**
     * 获取输入联想
     * @param associationText
     */
    public void getInputAssociationList(String associationText);

    /**
     * 输入状态发送
     * @param state
     */
    public void sendChatStateMessage(String state,String stateContent);


    /**
     * 获取机器人不满意理由 针对追一机器人
     */
    public void getRobotUnSatisfiedReason(JXMessage jxMessage);

    /**
     * 获取满意度评价信息
     * @param evaluateMessage
     * @param isCloseSession
     */
    public void fetchEvaluateInfo(JXMessage evaluateMessage, boolean isCloseSession);

    /**
     * 获取快捷提问
     */
    public void fetchQuickQuestion();

    /**
     * 获取订单列表
     */
    public void fetchOrderList(boolean refresh);

    /**
     * 获取常用问题
     * @param refresh
     */
    public void fetchcommonQuestionList(boolean refresh);

    /**
     *获取追一机器人商品订单列表
     * @param refresh
     */
    public void fetchZhuiyiProductList(boolean refresh);

    /**
     *
     * @param refresh
     */
    public void fetchZhuiyiLoanList(boolean refresh);

    /**
     * 发送追一商品订单信息
     */
    public void sendZhuiyiProductOrderMessage(ZhuiyiProductOrderEntity zhuiyiProductOrderEntity,String jxQuestion);

    /**
     * 发送追一取现订单信息
     */
    public void sendZhuiyiLoantOrderMessage(ZhuiyiLoanOrderEntity zhuiyiLoanOrderEntity,String jxQuestion);

    public void saveEvaluateFeedbackMessage(String msg);

    /**
     * 提交机器人满意度统计
     */
    public void submitRobotSatisfy();

    public void sendLocationMsg(String label,String lat , String lot,String baseImg);
}
